<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>纯CSS手风琴</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      .accordion {
        display: flex;
        width: 600px;
        height: 200px;
      }
      .accordion li {
        flex: 1;
        cursor: pointer;
        transition: all 300ms;
        list-style: none;
      }
      .accordion li:nth-child(1) {
        background-color: #f66;
      }
      .accordion li:nth-child(2) {
        background-color: #66f;
      }
      .accordion li:nth-child(3) {
        background-color: #f90;
      }
      .accordion li:nth-child(4) {
        background-color: #09f;
      }
      .accordion li:nth-child(5) {
        background-color: #9c3;
      }
      .accordion li:nth-child(6) {
        background-color: #3c9;
      }
      .accordion li:hover {
        flex: 2;
        background-color: #ccc;
      }
    </style>
  </head>
  <body>
    <div class="bruce flex-ct-x" data-title="手风琴">
      <ul class="accordion">
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </body>
</html>
